package com.zr.task.service.impl;

import java.util.List;

import com.zr.task.domain.EimTaskLog;
import com.zr.task.mapper.EimTaskCommandScheduleMapper;
import com.zr.task.mapper.EimTaskLogMapper;
import com.zr.task.service.IEimTaskCommandScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zr.task.mapper.EimTaskSamplingMapper;
import com.zr.task.domain.EimTaskSampling;
import com.zr.task.service.IEimTaskSamplingService;

import javax.annotation.Resource;

/**
 * 采样任务Service业务层处理
 * 
 * @author zhaojunqi
 * @date 2022-10-21
 */
@Service
public class EimTaskSamplingServiceImpl implements IEimTaskSamplingService 
{
    @Resource
    private EimTaskSamplingMapper eimTaskSamplingMapper;

    @Resource
    private EimTaskCommandScheduleMapper eimTaskCommandScheduleMapper;

    @Resource
    private EimTaskLogMapper eimTaskLogMapper;

    /**
     * 查询采样任务
     * 
     * @param id 采样任务主键
     * @return 采样任务
     */
    @Override
    public EimTaskSampling selectEimTaskSamplingById(Long id)
    {
        return eimTaskSamplingMapper.selectEimTaskSamplingById(id);
    }

    /**
     * 查询采样任务列表
     * 
     * @param eimTaskSampling 采样任务
     * @return 采样任务
     */
    @Override
    public List<EimTaskSampling> selectEimTaskSamplingList(EimTaskSampling eimTaskSampling)
    {
        return eimTaskSamplingMapper.selectEimTaskSamplingList(eimTaskSampling);
    }

    /**
     * 新增采样任务
     * 
     * @param eimTaskSampling 采样任务
     * @return 结果
     */
    @Override
    public int insertEimTaskSampling(EimTaskSampling eimTaskSampling)
    {
        return eimTaskSamplingMapper.insertEimTaskSampling(eimTaskSampling);
    }

    /**
     * 修改采样任务
     * 
     * @param eimTaskSampling 采样任务
     * @return 结果
     */
    @Override
    public int updateEimTaskSampling(EimTaskSampling eimTaskSampling)
    {
        return eimTaskSamplingMapper.updateEimTaskSampling(eimTaskSampling);
    }

    /**
     * 批量删除采样任务
     * 
     * @param ids 需要删除的采样任务主键
     * @return 结果
     */
    @Override
    public int deleteEimTaskSamplingByIds(Long[] ids)
    {
        return eimTaskSamplingMapper.deleteEimTaskSamplingByIds(ids);
    }

    /**
     * 删除采样任务信息
     * 
     * @param id 采样任务主键
     * @return 结果
     */
    @Override
    public int deleteEimTaskSamplingById(Long id)
    {
        return eimTaskSamplingMapper.deleteEimTaskSamplingById(id);
    }

    @Override
    public int updateEimTaskSamplingByIdCard(EimTaskSampling eimTaskSampling) {
        return eimTaskSamplingMapper.updateEimTaskSamplingByIdCard(eimTaskSampling);
    }

    @Override
    public int updateEimTaskCommandSchedule(String id) {
        return eimTaskCommandScheduleMapper.updateEimCommandScheduleById(id);
    }

    @Override
    public int addTaskTranshipmentLog(EimTaskLog eimTaskLog) {
        return eimTaskLogMapper.insertEimTaskLog(eimTaskLog);
    }

}
